package messages;


/**
 * AccountCreateMessage
 * 
 * Message sent by an admin to create a new account
 */
public class AccountCreateMessage extends Message {
	
	public AccountCreateMessage(String login, String password, String role) {
		this.login = login;
		this.password = password;
		this.role = role;
	}
	
	
	public AccountCreateMessage(String login, String password) {
		this(login, password, "User");
	}
	

	public String getLogin() {
		return login;
	}
	

	public String getPassword() {
		return password;
	}
	

	public String getRole() {
		return role;
	}
	
	
	public String getSenderLogin() {
		return senderLogin;
	}
	
	
	public void setSenderLogin(String senderLogin) {
		this.senderLogin = senderLogin;
	}
	
	
	@Override
	public String toString() {
		return super.toString() + "(login=" + this.login + ", role=" + role + ")";
	}
	

	private String login;
	private String password;
	private String role;
	private String senderLogin = null;	// Who did the request?

	private static final long serialVersionUID = 1L;
}
